package com.xywh.emergency_outbound.di.module;

import com.jess.arms.di.scope.FragmentScope;

import dagger.Module;
import dagger.Provides;

import com.xywh.emergency_outbound.mvp.contract.Tab1Contract;
import com.xywh.emergency_outbound.mvp.model.Tab1Model;


@Module
public class Tab1Module {
    private Tab1Contract.View view;

    /**
     * 构建Tab1Module时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public Tab1Module(Tab1Contract.View view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    Tab1Contract.View provideTab1View() {
        return this.view;
    }

    @FragmentScope
    @Provides
    Tab1Contract.Model provideTab1Model(Tab1Model model) {
        return model;
    }
}